package com.zys.pojo;

import java.io.Serializable;

/**
 * 用户实体类
 */
public class User implements Serializable {
  private Integer id;       // 用户 id
  private String username;  // 用户名
  private String password;  // 用户密码
  private String email;     // 用户邮箱
  private String telephone; // 用户手机号码
  private Boolean state;    // 用户激活状态
  private long regTime;     // 注册时间
  private Role role;        // 用户拥有的角色

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getTelephone() {
    return telephone;
  }

  public void setTelephone(String telephone) {
    this.telephone = telephone;
  }

  public Boolean getState() {
    return state;
  }

  public void setState(Boolean state) {
    this.state = state;
  }

  public Role getRole() {
    return role;
  }

  public void setRole(Role role) {
    this.role = role;
  }

  public long getRegTime() {
    return regTime;
  }

  public void setRegTime(long regTime) {
    this.regTime = regTime;
  }

  @Override
  public String toString() {
    return "User{" +
        "id=" + id +
        ", username='" + username + '\'' +
        ", password='" + password + '\'' +
        ", email='" + email + '\'' +
        ", telephone='" + telephone + '\'' +
        ", state=" + state +
        ", regTime=" + regTime +
        ", role=" + role +
        '}';
  }
}
